
import request from '@/utils/request'


// 新增公司
export function addbusiness(data) {
    return request({
      url: '/business/add',
      method: 'post',
      data: data
    })
  }


  
   // 更新公司
   export function updatebusiness(data) {
    return request({
      url: '/business/update',
      method: 'put',
      data: data
    })
}

// 查询公司列表
export function listbusiness(query) {
  return request({
    url: '/business/list',
    method: 'get',
    params: query
  })
}
// 查询公司名字列表
export function listbusinesscustomerName(query) {
  return request({
    url: '/business/listcustomerName',
    method: 'get',
    params: query
  })
}

// 删除角色
export function delbusiness(id) {
  return request({
    url: '/business/' + id,
    method: 'delete'
  })
}

// 查询角色详细
export function getbusiness(id) {
  return request({
    url: '/business/' + id,
    method: 'get'
  })
}

// 查询公司，联系人以及案件详细
export function getbusinessAndcase() {
  return request({
    url: '/business/listbusinessAndcontacts',
    method: 'get'
  })
}

// 查询联系人总数
export function getbusinesscount() {
  return request({
    url: '/business/count',
    method: 'get'
  })
}
// 查询联系人百分比
export function getpercentage() {
  return request({
    url: '/business/percentage',
    method: 'get'
  })
}
  

// 获取首页数据
export function getDashboardData() {
  return request({
    url: '/system/dashboard/data',  // 根据你的实际后端接口路径调整
    method: 'get'
  })
}

//查询出台湾内心员工
export function getTaiwanEmployee() {
  return request({
    url: '/business/listbusinessListTaiwan',
    method: 'get'
  })
}
  
  
